#include <iostream>

#include "ConcreteAggregate.h"
#include "ConcreteIterator.h"

int main(int argc, char* argv[]) {
    Aggregate<int>* aggr = new ConcreteAggregate<int>();
    aggr->pushData(3);
    aggr->pushData(2);
    aggr->pushData(1);
    Iterator<int>* it = aggr->createIterator();

    for (it->first(); !it->isDone(); it->next()) {
        std::cout << *it->curItem() << std::endl;
    }
    delete it;
    delete aggr;
}